<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>计划上报月计划表管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/plan/bsPlanMonth/">月度计划列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="bsPlanMonth" action="${ctx}/plan/bsPlanMonth/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>状态：</label>
				<form:select path="planStatus" class="input-medium">
					<form:option value="" label="请选择"/>
					<form:options items="${fns:getDictList('bs_plan_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>填报单位：</label>
			<sys:treeselect2 id="areaCode" name="areaCode" value="${bsPlanMonth.areaCode}" labelName="areaName" labelValue="${bsPlanMonth.areaName}"
				title="部门" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="false"/>
			</li>
			<li><label>计划日期：</label>
				<input name="planDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${bsPlanMonth.planDate}" pattern="yyyy-MM"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<shiro:hasPermission name="plan:bsPlanMonth:edit"><th>操作</th></shiro:hasPermission>
				<th>计划</th>
				<th>状态</th>
				<th>填报单位</th>
				<th>填报人</th>
				<th>审核单位</th>
				<th>计划日期</th>
				<th>类型</th>
				<th>备注</th>
				<th>创建日期</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="bsPlanMonth">
			<tr>
				<shiro:hasPermission name="plan:bsPlanMonth:edit"><td>
				<c:if test="${bsPlanMonth.fromOrgCode == office.code && (bsPlanMonth.planStatus == 0 || bsPlanMonth.planStatus == 9)}">
    				<a href="${ctx}/plan/bsPlanMonth/formEdit?id=${bsPlanMonth.id}">修改</a>
					<a href="${ctx}/plan/bsPlanMonth/delete?id=${bsPlanMonth.id}" onclick="return confirmx('确认要删除该月计划吗？', this.href)">删除</a>
				</c:if>
				<c:if test="${bsPlanMonth.fromOrgCode == office.code && (bsPlanMonth.planStatus == 3 && bsPlanMonth.affirmStatus == 1)}">
    				<a href="${ctx}/plan/bsPlanMonth/formView?id=${bsPlanMonth.id}">强制确认</a>
				</c:if>
				<c:if test="${bsPlanMonth.fromOrgCode == office.code && (bsPlanMonth.planStatus == 3 && bsPlanMonth.affirmStatus == 0)}">
    				<a href="${ctx}/plan/bsPlanMonth/formEdit?id=${bsPlanMonth.id}">确认</a>
				</c:if>
				</td></shiro:hasPermission>
				<td><a href="${ctx}/plan/bsPlanMonth/formView?id=${bsPlanMonth.id}">
					${bsPlanMonth.planTitle}
				</a></td>
				<td>
					${fns:getDictLabel(bsPlanMonth.planStatus, "bs_plan_status", "-")}
				</td>
				<td>
					${bsPlanMonth.fromOrgName}
				</td>
				<td>
					${bsPlanMonth.planBy}
				</td>
				<td>
					${bsPlanMonth.toOrgName}
				</td>
				<td>
					<fmt:formatDate value="${bsPlanMonth.planDate}" pattern="yyyy年MM月"/>
				</td>
				<td>
					${fns:getDictLabel(bsPlanMonth.type, 'bs_vaccine_type', '')}
				</td>
				<td>
					${bsPlanMonth.remarks}
				</td>
				<td>
					<fmt:formatDate value="${bsPlanMonth.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>